package com.laogao.lesson013.hander;

/**
 * <b>description</b>： Java进阶、性能优化实战案例100讲，微信公众号:程序员恰恰，源码 & 文档 & 技术支持，请加个人微信号：it3306 <br>
 * <b>time</b>：2025/4/24 6:39 <br>
 * <b>author</b>：ready lao_gao
 */
public class BusinessExceptionUtils {
    /**
     * 创建 BusinessException
     *
     * @param code
     * @param msg
     * @return
     */
    public static BusinessException businessException(int code, String msg) {
        return new BusinessException(code, msg);
    }

    public static BusinessException businessException(String msg) {
        return new BusinessException(msg);
    }

    /**
     * 创建 BusinessException
     *
     * @param code
     * @param msg
     * @param cause
     * @return
     */
    public static BusinessException businessException(int code, String msg, Throwable cause) {
        return new BusinessException(code, msg, cause);
    }
}
